package com.firebird.app.kotlin.stock.trend.bean

import java.io.Serializable
import java.util.*


/**
 * 新闻资讯实体类
 * @author ljk
 * @date   2019年11月7日
 */
class News : Serializable {
    var id: Long = 0
    /**新闻标题 */
    var title: String? = null
    /**新闻简介 */
    var summary: String? = null
    /**新闻来源 */
    var from: String? = null
    /**新闻创建时间 */
    var createTime: Date? = null
    /**新闻预览图片URL */
    var imgUrl: String? = null
    /**新闻内容 */
    var content: String? = null

    override fun hashCode(): Int {
        val prime = 31
        var result = 1
        result = prime * result + (id xor (id ushr 32)).toInt()
        return result
    }

    override fun equals(obj: Any?): Boolean {
        if (this === obj) return true
        if (obj == null) return false
        if (javaClass != obj.javaClass) return false
        val other = obj as News
        return if (id != other.id) false else true
    }

    companion object {
        private const val serialVersionUID = -6704639076871259012L
    }
}
